//
//  NotesLiveCollectionViewCell.m
//  TravelFirst
//
//  Created by lanou on 15/9/20.
//  Copyright (c) 2015年 吴娅君. All rights reserved.
//

#import "NotesLiveCollectionViewCell.h"

@implementation NotesLiveCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        self.pictureImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, frame.size.width, frame.size.height)];
        [self.contentView addSubview:self.pictureImageView];
    }
    return self;
}

- (void)setModel:(NotesModel *)model dictionary:(NSDictionary *)dictionary
{
    [model shareJsonWithDictionary:dictionary];
    NSMutableArray *array = dictionary[@"pictures"];
    NSDictionary *dic = [array objectAtIndex:0];
    [model shareJsonWithDictionary:dic];
}

- (void)setValueWithModel:(NotesModel *)model
{
    [self.pictureImageView sd_setImageWithURL:[NSURL URLWithString:model.picture] placeholderImage:nil];
}

@end
